package admin.controller;

import admin.service.AppealService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/appeal")
public class AppealController {

    @Autowired
    private AppealService appealService;

    @PutMapping("/process/{id}")
    public ResponseEntity<Void> processAppeal(@PathVariable Long id) {
        appealService.processAppeal(id);
        return ResponseEntity.noContent().build();
    }

    @PutMapping("/approve/{id}")
    public ResponseEntity<Void> approveAppeal(@PathVariable Long id) {
        appealService.approveAppeal(id);
        return ResponseEntity.noContent().build();
    }
}